<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 内联方式 -->
    <script>
        // alert('嘿嘿')
    </script>
</head>
<body>
    <!-- 行内方式 -->
    <input type="button" value="点我" onclick="alert('哈哈')"> <br>
    <button type="button" onclick="alert('嘻嘻')">点我</button>

    <!-- 外部方式 -->
    <!-- <script src="js/hello.js"></script> -->

    <!-- 
        基本用法
     -->
    <script>
        /**
         * 变量
         */ 
        var name;
        name = 'tom'

        // var age = 18

        {
            // var age = 18
            let age = 18
        }

        // alert(age)

        const num = 5;

        // num = 6

        // sex = 'male'
        // alert(sex)


        /**
         * 输入和输出
         */ 
        // console.log(name)

        var score = prompt('请输入你的分数:')
        console.log(score)
        console.log(score+1)  
        console.log(typeof score)
        console.log(typeof Number(score))
        score = Number(score)
        console.log(score+1)


    </script> 
</body>
</html>